Optimal. Leaf size=57 \[ -\frac {1}{2} \log (1-x) (d+e+f+g)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g)+\frac {1}{6} \log (x+1) (d-e+f-g)+g x \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1586, 2074} \begin {gather*} -\frac {1}{2} \log (1-x) (d+e+f+g)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g)+\frac {1}{6} \log (x+1) (d-e+f-g)+g x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 2074
Rubi steps
\begin {align*} \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx &=\int \frac {d+e x+f x^2+g x^3}{2-x-2 x^2+x^3} \, dx\\ &=\int \left (g+\frac {d+2 e+4 f+8 g}{3 (-2+x)}+\frac {-d-e-f-g}{2 (-1+x)}+\frac {d-e+f-g}{6 (1+x)}\right ) \, dx\\ &=g x-\frac {1}{2} (d+e+f+g) \log (1-x)+\frac {1}{3} (d+2 e+4 f+8 g) \log (2-x)+\frac {1}{6} (d-e+f-g) \log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 55, normalized size = 0.96 \begin {gather*} \frac {1}{6} (-3 \log (1-x) (d+e+f+g)+2 \log (2-x) (d+2 e+4 f+8 g)+\log (x+1) (d-e+f-g)+6 g x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(2+x) \left (d+e x+f x^2+g x^3\right )}{4-5 x^2+x^4} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.16, size = 47, normalized size = 0.82 \begin {gather*} g x + \frac {1}{6} \, {\left (d - e + f - g\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.37, size = 53, normalized size = 0.93 \begin {gather*} g x + \frac {1}{6} \, {\left (d + f - g - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + f + g + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 4 \, f + 8 \, g + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 89, normalized size = 1.56 \begin {gather*} \frac {d \ln \left (x -2\right )}{3}-\frac {d \ln \left (x -1\right )}{2}+\frac {d \ln \left (x +1\right )}{6}+\frac {2 e \ln \left (x -2\right )}{3}-\frac {e \ln \left (x -1\right )}{2}-\frac {e \ln \left (x +1\right )}{6}+\frac {4 f \ln \left (x -2\right )}{3}-\frac {f \ln \left (x -1\right )}{2}+\frac {f \ln \left (x +1\right )}{6}+g x +\frac {8 g \ln \left (x -2\right )}{3}-\frac {g \ln \left (x -1\right )}{2}-\frac {g \ln \left (x +1\right )}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 47, normalized size = 0.82 \begin {gather*} g x + \frac {1}{6} \, {\left (d - e + f - g\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.82, size = 59, normalized size = 1.04 \begin {gather*} \ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}\right )-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}+\frac {f}{2}+\frac {g}{2}\right )+\ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}+\frac {4\,f}{3}+\frac {8\,g}{3}\right )+g\,x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 91.47, size = 1389, normalized size = 24.37
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________